/**
 * Copyright (C) 2013 DaiKit.com - daikit4gxt module (admin@daikit.com)
 *
 *         Project home : http://code.daikit.com/daikit4gxt
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.daikit.daikit4gxt.client.action;

import java.io.Serializable;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.sencha.gxt.data.client.loader.RpcProxy;
import com.sencha.gxt.data.shared.loader.ListLoadConfig;
import com.sencha.gxt.data.shared.loader.ListLoadResult;

/**
 * 
 * @author tcaselli
 * @version $Revision$ Last modifier: $Author$ Last commit: $Date$
 * @param <B>
 *            the type of the beans returned in the {@link ListLoadResult}
 * @param <C>
 *            the type of the given {@link ListLoadConfig}
 * @param <D>
 *            the type of the RPC returned {@link ListLoadResult}
 */
class DkBaseListLoaderRpcProxy<B extends Serializable, C extends ListLoadConfig, D extends ListLoadResult<B>> extends RpcProxy<C, D>
{

	private DkLoadAction<B, C, D> baseLoadAction;

	@Override
	public void load(final C loadConfig, final AsyncCallback<D> callback)
	{
		baseLoadAction.load(loadConfig, callback);
	}

	/**
	 * @return the baseLoadAction
	 */
	public DkLoadAction<B, C, D> getBaseLoadAction()
	{
		return baseLoadAction;
	}

	/**
	 * @param baseLoadAction
	 *            the baseLoadAction to set
	 */
	public void setBaseLoadAction(final DkLoadAction<B, C, D> baseLoadAction)
	{
		this.baseLoadAction = baseLoadAction;
	}
}
